@@ -1,5 +1,10 @@
Revision history for Catalyst-Plugin-Authentication-Store-DBIx-Class
+0.1501 2011-06-17
+ * If use_userdata_from_session isn't set, then don't store more
+ fields than we need in the session -- only the fields we need to
+ load the object from the DB again.
+
0.1500 2010-11-16
* Allow specifying a fully loaded DBIC result in addition to resultsets
of which only the first row is considered.
@@ -18,6 +18,14 @@ no_index:
directory:
- inc
- t
+provides:
+ Catalyst::Authentication::Realm::SimpleDB:
+ file: lib/Catalyst/Authentication/Realm/SimpleDB.pm
+ Catalyst::Authentication::Store::DBIx::Class:
+ file: lib/Catalyst/Authentication/Store/DBIx/Class.pm
+ version: 0.1501
+ Catalyst::Authentication::Store::DBIx::Class::User:
+ file: lib/Catalyst/Authentication/Store/DBIx/Class/User.pm
requires:
Catalyst::Model::DBIC::Schema: 0.18
Catalyst::Plugin::Authentication: 0.10008
@@ -31,4 +39,4 @@ requires:
resources:
license: http://dev.perl.org/licenses/
repository: http://dev.catalystframework.org/repos/Catalyst/Catalyst-Authentication-Store-DBIx-Class
-version: 0.1500
+version: 0.1501
@@ -3,7 +3,7 @@ NAME
Catalyst Authentication using DBIx::Class
VERSION
- This documentation refers to version 0.1500.
+ This documentation refers to version 0.1501.
SYNOPSIS
use Catalyst qw/
@@ -165,7 +165,14 @@ sub for_session {
#return $frozenuser;
my %userdata = $self->_user->get_columns();
- return \%userdata;
+
+ # If use_userdata_from_session is set, then store all of the columns of the user obj in the session
+ if (exists($self->config->{'use_userdata_from_session'}) && $self->config->{'use_userdata_from_session'} != 0) {
+ return \%userdata;
+ } else { # Otherwise, we just need the PKs for load() to use.
+ my %pk_fields = map { ($_ => $userdata{$_}) } @{ $self->config->{id_field} };
+ return \%pk_fields;
+ }
}
sub from_session {
@@ -285,7 +292,7 @@ module.
=head1 VERSION
-This documentation refers to version 0.1500.
+This documentation refers to version 0.1501.
=head1 SYNOPSIS
@@ -4,7 +4,7 @@ use strict;
use warnings;
use base qw/Class::Accessor::Fast/;
-our $VERSION= "0.1500";
+our $VERSION= "0.1501";
BEGIN {
@@ -92,7 +92,7 @@ Catalyst::Authentication::Store::DBIx::Class - A storage class for Catalyst Auth
=head1 VERSION
-This documentation refers to version 0.1500.
+This documentation refers to version 0.1501.
=head1 SYNOPSIS